/*****************************************************************************
 * 
 * Copyright [2013] [Mervin.Wong]
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 *       
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *  
 *****************************************************************************/
package base.feature;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Stack;

import base.Network;

/**
 *@name InterfacePath.java
 *@description 
 *@author 王进法<Mervin.Wong>
 *@version 
 *@Date 2013-1-12下午4:29:51
 */
/**************************************************************************************
 * 1, int[][] internodePath(preNodeId, postNodeId)//节点间的路径,多条路径
 * 2, int internodePathLength(preNodeId, postNodeId)//节点间的路径长度：最短路径边数
 * 3, float netAvgPathLength(network net)//网络平均路径长度
 ***************************************************************************************/
public interface InterfacePath {
	/**
	 * @name bothNodesPath
	 * @description 计算两个节点间的路径
	 * @param preNodeId
	 * @param postNodeId
	 * @return ArrayList<ArrayList<Number>> path 保存节点的ID
	 */
	public ArrayList<Stack<Number>> bothNodesPath(Number preNodeId, Number postNodeId);
	
	/**
	 * @name bothNodesPath
	 * @description 计算两个节点间的路径
	 * @param Network net
	 * @param preNodeId
	 * @param postNodeId
	 * @return ArrayList<Stack<Number>> path 保存节点的ID
	 */
	public ArrayList<Stack<Number>> bothNodesPath(Network net,  Number preNodeId, Number postNodeId);
	
	
	/**
	 * @name bothNodesPathLength
	 * @description 节点间的路径长度
	 * @param preNodeId
	 * @param postNodeId
	 * @return int length
	 */
	public int bothNodesPathLength(Number preNodeId, Number postNodeId);
	
	/**
	 * @name internodePathLength
	 * @description 节点间的路径长度
	 * @param Network net
	 * @param preNodeId
	 * @param postNodeId
	 * @return int length
	 */
	public int bothNodesPathLength(Network net,  Number preNodeId, Number postNodeId);
	
	/**
	 * @name bothNodesShortestPath
	 * @descripion 两点之间的最短路径
	 * @param preNodeId
	 * @param postNodeId
	 * @return
	 */
	public ArrayList<HashSet<Number>> bothNodesShortestPath(Number preNodeId, Number postNodeId);
	
	/**
	 * @name bothNodesShortestPath
	 * @descripion 两点之间的最短路径
	 * @param Net
	 * @param preNodeId
	 * @param postNodeId
	 * @return
	 */
	public ArrayList<HashSet<Number>> bothNodesShortestPath(Network net, Number preNodeId, Number postNodeId);
	

	/**
	 * @name netDiameter
	 * @description 网络直径
	 * @return
	 */
	public int netDiameter();
	

	/**
	 * @name netDiameter
	 * @description 网络直径
	 * @param net
	 * @return
	 */
	public int netDiameter(Network net);
	
	/**
	 * @name netAvgPathLength 
	 * @description 网络的平均路径长度
	 * @return
	 */
	public float netAvgPathLength();
	
	/**
	 * 
	 * @name netAvgPathLength 
	 * @description 网络的平均路径长度
	 * @param Network net
	 * @return
	 */
	public float netAvgPathLength(Network net);
}
